<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="/weixin/css/mui.min.css">
		<style type="text/css">
			#head {
				line-height: 40px;
			}
			.head-img {
				width: 40px;
				height: 40px;
			}
			#logo {
				position: absolute;
				bottom: 10px;
				right: 40px;
				width: 40px;
				height: 40px;
			}
			.mui-table-view span {
				color: #999;
			}
			.mui-table-view span a {
				margin-top: -43px;
				
			}
			.mui-content>.mui-table-view:first-child {
			    margin-top: 0px;
			}
			.mui-content>.mui-table-view:not(:first-child) {
			    margin-top: 15px;
			}
			.mui-pull-right{
				margin-right: 25px;
			}
			.mui-pull-right-a{
				margin-right: 10px !important;
    			margin-top: -30px !important;
    			color: #E88243 !important;
			}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-back mui-pull-left"></a>
		    <h1 id="headerTitle" class="mui-title">我的资料</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a id="head" class="mui-navigate-right">头像
					<span class="mui-pull-right head">
						<img class="head-img mui-action-preview" id="logo" src="">
					</span>
				</a>
				</li>
				<li class="mui-table-view-cell">
					<a>昵称<span class="mui-pull-right" id="nickname">未填写</span></a>
				</li>
				<li class="mui-table-view-cell li-edit-info" data-id='1'>
					<a>签名<span class="mui-pull-right" id="signature">未填写</span><span class="mui-navigate-right"></span></a>
				</li>
				<li class="mui-table-view-cell li-edit-info" data-id='2'>
					<a>性别<span class="mui-pull-right" id="sex">未填写</span><span class="mui-navigate-right"></span></a>
				</li>
				<li class="mui-table-view-cell li-edit-info" data-id='3'>
					<a>城市<span class="mui-pull-right" id="city">未填写</span><span class="mui-navigate-right"></span></a>
				</li>
				<li class="mui-table-view-cell li-edit-info" data-id='4'>
					<a>职业<span class="mui-pull-right" id="profession">未填写</span><span class="mui-navigate-right"></span></a>
				</li>
				<li class="mui-table-view-cell li-edit-info" data-id='5'>
					<a>邮箱<span class="mui-pull-right" id="email">未填写</span><span class="mui-navigate-right"></span></a>
				</li>
			</ul>
			
			
			<ul class="mui-table-view">
				<li class="mui-table-view-cell li-edit-info" data-id='6'>
					<a>身份证<a href="#" class="mui-pull-right mui-pull-right-a">实名认证</a><span class="mui-navigate-right"></span></a>
				</li>
			</ul>
			
			<ul class="mui-table-view">
				<li class="mui-table-view-cell li-edit-info" data-id='7'>
					<a>手机号&nbsp;&nbsp<span id="mobile">未填写</span><a href="#" class="mui-pull-right mui-pull-right-a">更换</a><span class="mui-navigate-right"></span></a>
				</li>
			</ul>
			
		</div>
	</body>
	<script src="/weixin/js/mui.min.js"></script>
	<script src="/weixin/js/jquery.min.js"></script>
	<script src="/weixin/js/comment.js"></script>
	<script>
		mui.init();
		
		mui.ready(function(){
			//获取个人详细信息
			setTimeout(function(){
				jQuery.ajax({
					type:'get',
					url:ajaxUrlPath+'/wx/member/detail',
					async:true,
					success:function(data){
						if(data!=null){
							jQuery('#logo').attr('src',data.logo==null?'images/logo.png':data.logo);
							jQuery('#nickname').text(data.nickname==null?'未填写':data.nickname);
							jQuery('#signature').text(data.signature==null?'未填写':data.signature);
							if(data.sex==1){
								jQuery('#sex').text('男');
							}else if(data.sex==2){
								jQuery('#sex').text('女');
							}else{
								
							}
							jQuery('#city').text(data.city==null?'未填写':data.city);
							jQuery('#profession').text(data.profession==null?'未填写':data.profession);
							jQuery('#email').text(data.email==null?'未填写':data.email);
							var mobile=data.mobile;
							if(mobile!=null){
								jQuery('#mobile').text(mobile.replace(mobile.substr(3,4),'****'));
							}
						}
					}
				});
			});
			
			jQuery('.li-edit-info').bind('click',function(){
				var editMark=jQuery(this).attr('data-id');
				window.location="setMyself.html?editMark="+editMark;
			});
		});
	</script>
</html>